<template>
  <div class="nav-container">
    <el-menu
      :default-active="activeIndex"
      class="nav-menu"
      mode="horizontal"
      router>
      
      <!-- ... 现有的菜单项 ... -->
      
      <!-- 使用 Element UI 的图标 -->
      <el-menu-item index="/work-tree">
        <i class="el-icon-picture"></i>
        <span>作品树</span>
      </el-menu-item>
    </el-menu>
  </div>
</template>

<script setup>
import { ref } from 'vue'

const activeIndex = ref(location.pathname)
</script> 